CC = g++
CFLAGS = -O3 -Wall 
CFLAGS += -D_FILE_OFFSET_BITS=64
CFLAGS += -D_LARGEFILE_SOURCE
CFLAGS += -fno-exceptions
CFLAGS += -finline-functions
CFLAGS += -funroll-loops

all: fastatotext texttodna encoding sortpartitions mergepartitions search testsearch searchperformance
fastatotext:
	$(CC) $(CFLAGS) fastatotext.c -o fastatotext
texttodna:
	$(CC) $(CFLAGS) texttodna.c -o texttodna
encoding:
	$(CC) $(CFLAGS) encodeFolder.c -o encodeFolder
sortpartitions:
	$(CC) $(CFLAGS) partitionsinfo.c larsson.c sarrayLarsson.c sorting.c -o sortPartitions
mergepartitions:
	$(CC) $(CFLAGS) partitionsinfo.c reader.c mergeST.c mergeToSuffixTree.c -o mergeToSuffixTree
search:
	$(CC) $(CFLAGS) search.c searchExactPattern.c -o search
testsearch:
	$(CC) $(CFLAGS) search.c testSuffixTree.c -o searchTest
searchperformance:
	$(CC) $(CFLAGS) search.c searchPerformance.c -o searchPerformance

clean:  
	rm fastatotext texttodna encodeFolder sortPartitions mergeToSuffixTree search searchTest searchPerformance
